package pers.lxl.structure.linkedlist;

public class Main {

    public static void main(String[] args) {
        LinkedList<Integer> linkedList = new LinkedList<>();

        for (int i = 0; i < 10; i++) {
            linkedList.addFirst(i);
            System.out.println(linkedList);
        }


        for (int i = 9; i > 0; i--) {
            linkedList.remove(i);
            System.out.println(linkedList);
        }
    }
}
